package com.sky.service;

import com.sky.dto.ShoppingCartDTO;
import com.sky.entity.ShoppingCart;

import java.util.List;

/**
 * @author: hea7en
 * @Date: 2024/5/21 11:14 AM
 * @Description: 购物车业务层
 */
public interface ShoppingCartService {

    /**
     * 添加购物车
     * @param shoppingCartDTO
     */
    void addShoppingCart(ShoppingCartDTO shoppingCartDTO);

    /**
     * 获取购物车列表
     * @return
     */
    List<ShoppingCart> getCartList();

    /**
     * 清空购物车
     */
    void cleanCart();

    /**
     * 减少购物车某个商品
     * @param shoppingCartDTO
     */
    void subOneCart(ShoppingCartDTO shoppingCartDTO);
}
